package perfect;


/**
 * @author GaoXi
 * @date 2021/6/8 20:03
 */
public class CryptoStream extends DecoratorStream {

    Stream stream;

    public CryptoStream(perfect.Stream stream) {
        super(stream);
    }


    @Override
    public char read(int num) {
        //加密操作
        stream.read(num);

        return 0;
    }

    @Override
    public void write(char c) {
        //加密操作
        stream.write(c);
    }
}
